package com.zf.museum.controller;

import com.zf.museum.model.Wrong;
import com.zf.museum.service.WrongService;
import org.apache.shiro.authz.annotation.RequiresRoles;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

@RestController
@RequestMapping("/wrong")
public class WrongController {

    @Autowired
    private WrongService wrongService;

    @GetMapping("/getWrong")
    @RequiresRoles("user")
    public Wrong getWrong(@RequestParam("openId") String openId) {

        return wrongService.getWrong(openId);
    }
}
